<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="<?=ADMIN_RES_PATH ?>/css/default/admin.css" rel="stylesheet" type="text/css">
<script src="<?=ADMIN_RES_PATH ?>/js/jquery-1.7.1.js" type="text/javascript"></script>
<script src="<?=ADMIN_RES_PATH ?>/js/public.js" type="text/javascript"></script>
<script>
window.UEDITOR_HOME_URL = "/public/addones/ueditor/";
</script>
<script type="text/javascript" charset="gbk" src="/public/addones/ueditor/ueditor.config.js"></script>
<script type="text/javascript" charset="gbk" src="/public/addones/ueditor/ueditor.all.min.js"> </script>
<script type="text/javascript" charset="gbk" src="/public/addones/ueditor/lang/zh-cn/zh-cn.js"></script>
</head>
<body>
<div id="main">
	<div class="title">分类管理</div>
	<div class="content">
        <?php $article = $this->article; ?>
<form method="post" action="<?=ADMIN_PATH ?>/Article/doupdate" enctype="multipart/form-data">
    <input type="text" name="act" style="display:none" value="<?=$this->act ?>"/>
	<input type="text" name="id" style="display:none" value="<?=$article['id'] ?>"/>
    <table width="98%" border="0" cellspacing="0" cellpadding="0" class="mytab">
      <tr>
        <td colspan="3" class="tit">添加文章</td>
        </tr>
      <tr>
        <td width="189" align="center">标题
        <td width="800"><input type="text" name="title" class="inp" value="<?=$article['title'] ?>"/></td>
        <td width="129" align="left">&nbsp;</td>
      </tr>
      <tr>
        <td align="center">分类</td>
        <td>
  			<select name="cateid" class="select">
  			<?php foreach ($this->cates as $cate) { ?>
  			    <option value="<?=$cate['id'] ?>" <?php if($article['cateid'] == $cate['id']) echo 'selected="selected"'; ?>><?=$cate['name'] ?> </option>
  			<?php } ?>
  			</select>
  	  </td>
        <td align="left">&nbsp;</td>
      </tr>
  	<tr>
        <td width="189" align="center">内容</td>
        <td width="800"><textarea name="content" rows="10" id="editor"><?=$article['content'] ?></textarea>
  	  <script>
  			var ue = UE.getEditor('editor',{
  				initialFrameWidth : null,
  				initialFrameHeight: 300
  			});
  		</script>
  		</td>
        <td width="129" align="left">&nbsp;</td>
      </tr>
      <tr>
        <td align="center">&nbsp;</td>
        <td ></td>
        <td align="left">&nbsp;</td>
      </tr>
      <tr>
        <td >&nbsp;</td>
        <td ><input type="submit" class="sub" value="提交"/>&nbsp;
          <input name="button" type="button" onClick="javascript:history.back()" value="取消"/></td>
        <td align="left">&nbsp;</td>
      </tr>
    </table>
</form>

	</div>
</div>
</body>
</html>
